package com.gold.job;

import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.gold.service.CardService;

public class CardJob extends QuartzJobBean implements StatefulJob {

	private Logger log = Logger.getLogger(this.getClass());

	private CardService cs;

	public void setCs(CardService cs) {
		this.cs = cs;
	}

	@Override
	protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException {
		log.info("---------------CardJobStart---------------");
		cs.updateCardStatusStartJob();
		cs.updateCardStatusEndJob();
		cs.updateCardStatusBetweenJob();
		log.info("---------------CardJobEnd---------------");
	}

}
